<style type="text/css">
        .wrapper{
            width: 200px;
            margin: 30px auto;
        }
        input.error{
            border: 1px solid #a10;
        }
        .error{

            color: #a10;
        }
        /*p.error{
            display: none;
        }*/
</style>
<div class="bg-light lter b-b wrapper-md">
    <h1 class="m-n font-thin h3">
        添加风险点
    </h1>
</div>
<div class="wrapper-md">
    <div class="panel panel-default">
        <div class="panel-heading font-bold">
            风险点基本信息
        </div>
        <div class="panel-body">
            <form class="form-horizontal form-validation" color="white" name="signUpForm" ng-submit="submit()" >
                <!--风险点名称-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        风险点名称：
                    </label>
                    <div class="col-sm-5">
                        <input class="form-control" ng-model="equipment.name" type="text" name="name"   
                               ng-maxlength="32" ng-focus="equipment.nameadd()" ng-blur="equipment.nameblur()"/><!--ng-minlength="4"-->
                    </div>
                    <!--验证信息-->
                    <label class="col-sm-5 control-label">
                        <div ng-show="equipment.namecheck" align="left">
                            <span class="error">风险点名称不能为空</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <!--风险点详细位置-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        风险点详细位置：
                    </label>
                    <div class="col-sm-5">
                        <input class="form-control" ng-model="equipment.location" type="text" name="location"   
                               ng-maxlength="32" ng-focus="equipment.locationadd()" ng-blur="equipment.locationblur()"/><!--ng-minlength="4"-->
                    </div>
                    <!--验证信息-->
                    <label class="col-sm-5 control-label">
                        <div ng-show="equipment.locationcheck" align="left">
                            <span class="error">风险点详细位置不能为空</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <!--生产厂家-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        生产厂家：
                    </label>
                    <div class="col-sm-5">
                        <input class="form-control" ng-model="equipment.manufacturer" type="text" name="manufacturer"   
                               ng-maxlength="32" ng-focus="equipment.manufactureradd()" ng-blur="equipment.manufacturerblur()"/><!--ng-minlength="4"-->
                    </div>
                    <!--验证信息-->
                    <label class="col-sm-5 control-label">
                        <div ng-show="equipment.manufacturercheck" align="left">
                            <span class="error">生产厂家不能为空</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <!--生产日期-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        生产日期：
                    </label>
                    <div class="col-sm-5">
                        <!--<input class="form-control" ng-model="equipment.production_data" type="text" name="production_data"   
                               ng-maxlength="32" ng-focus="equipment.production_dataadd()" ng-blur="equipment.production_datablur()"/>ng-minlength="4"-->
                        <div class="pull-left input-group" style="width: 274px">
                            <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date.lable" is-open="date.opened" 
                                readonly close-text="关闭" current-text="今天" clear-text="清除" />
                            <span class="input-group-btn">
                                <button type="button" class="btn btn-default"
                                        ng-click="dateOpen($event, date)">
                                    <i class="glyphicon glyphicon-calendar"></i>
                                </button>
                            </span>
                        </div>
                    </div>
                    <!--验证信息-->
                    <label class="col-sm-5 control-label">
                        <div ng-show="equipment.production_datacheck" align="left">
                            <span class="error">生产日期不能为空</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <!--检验单位-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        检验单位：
                    </label>
                    <div class="col-sm-5">
                        <input class="form-control" ng-model="equipment.inspection_unit" type="text" name="inspection_unit"   
                               ng-maxlength="32" ng-focus="equipment.inspection_unitadd()" ng-blur="equipment.inspection_unitblur()"/><!--ng-minlength="4"-->
                    </div>
                    <!--验证信息-->
                    <label class="col-sm-5 control-label">
                        <div ng-show="equipment.inspection_unitcheck" align="left">
                            <span class="error">检验单位不能为空</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <!--检验日期-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        检验日期：
                    </label>
                    <div class="col-sm-5">
                        <!--<input class="form-control" ng-model="equipment.inspection_data" type="text" name="inspection_data"   
                               ng-maxlength="32" ng-focus="equipment.inspection_dataadd()" ng-blur="equipment.inspection_datablur()"/>ng-minlength="4"-->
                               <div class="pull-left input-group" style="width: 274px">
                                    <input type="text" class="form-control" datepicker-popup="yyyy-MM-dd" ng-model="date1.lable" is-open="date1.opened" 
                                        readonly close-text="关闭" current-text="今天" clear-text="清除" />
                                    <span class="input-group-btn">
                                        <button type="button" class="btn btn-default"
                                                ng-click="dateOpen1($event, date1)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
                                    </span>
                               </div>
                    </div>
                    <!--验证信息-->
                    <label class="col-sm-5 control-label">
                        <div ng-show="equipment.inspection_datacheck" align="left">
                            <span class="error">检验日期不能为空</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <!--监督-->
                <div class="form-group">
                    <label class="col-sm-3 control-label">
                        监督检查合格证是否齐全：
                    </label>
                    <div class="col-sm-9">
                        <label class="i-checks checkbox-inline">
                            <input name="rp_type" ng-model="equipment.certificate" type="radio" value="0">
                                <i>
                                </i>
                                否
                        </label>
                        <label class="i-checks checkbox-inline">
                            <input name="rp_type" ng-model="equipment.certificate" type="radio" value="1">
                                <i>
                                </i>
                                是
                        </label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in">
                </div>
                <!--检验周期-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        检验周期：
                    </label>
                    <div class="col-sm-2" style="width: 120px">
                        <input class="form-control" ng-model="equipment.maintenance_cycle" type="number" style="width: 100px" min="0"  
                               ng-blur="equipment.cycleblur()" ng-focus="equipment.cycleadd()"/><!--ng-minlength="4"-->
                    </div>
                    <label class="col-sm-2 control-label" style="padding-left:0px; text-align:left" >
                        天
                    </label>
                    <label class="col-sm-3 control-label">
                        <div ng-show="equipment.cyclecheck" align="left" style="padding-left: 0px">
                            <span class="error">检验周期不能为空或为0</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>               
               <!--责任部门-->
                <div class="form-group">
                    <label class="col-sm-3 control-label">
                        旅游企业风险管控责任部门：
                    </label>
                    <div class="col-sm-5">
                        <input class="form-control" ng-model="equipment.control_department" type="text" name="control_department"   
                               ng-maxlength="32" ng-focus="equipment.control_departmentadd()" ng-blur="equipment.control_departmentblur()"/><!--ng-minlength="4"-->
                    </div>
                    <!--验证信息-->
                    <label class="col-sm-4 control-label">
                        <div ng-show="equipment.control_departmentcheck" align="left">
                            <span class="error">责任部门不能为空</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                 <!--下拉列表-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        责任人：
                    </label>
                    <div class="col-sm-2">
                        <div style="width: 160px">
                            <ui-select ng-model="equipment.responsible_person" theme="bootstrap"
                                on-select="onSelect($item, $model)" ng-change="equipment.perphone()"
                                >
                                <ui-select-match >
                                    {{$select.selected.name}}
                                </ui-select-match>
                                <ui-select-choices 
                                repeat="item.id as item in equipment.types | filter: $select.search">
                                    <span ng-bind-html="item.name | highlight: $select.search"></span>
                                </ui-select-choices>
                            </ui-select>
                       </div>
                    </div>
                    <div ng-if="equipment.showerror">
                    <label class="col-sm-3 control-label" align="left" style="padding-left: 0px">
                                <span class="error">请选择责任人</span>                           
                    </label>
                    </div>
                    <div ng-if="equipment.showmobi">
                        <label class="col-sm-2 control-label" >
                                责任人电话：               
                        </label>
                        <label class="col-sm-6 control-label" style="padding: 0px">
                                <input style="width:250px;" class="form-control" type="text" ng-model="equipment.showphone" disabled>
                        </label>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in">
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        存在隐患状况：
                    </label>
                    <div class="col-sm-10">
                        <textarea class="form-control" ng-model="equipment.hidden_trouble" type="textarea" name="hidden_trouble">
                        </textarea>                   
                    </div>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        应急措施：
                    </label>
                    <div class="col-sm-10">
                        <textarea class="form-control" ng-model="equipment.emergency_measure" type="textarea" name="emergency_measure">
                        </textarea>                   
                    </div>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <!--专业安全监管部门-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                        专业安全监管部门：
                    </label>
                    <div class="col-sm-5">
                        <input class="form-control" ng-model="equipment.safe_department" type="text" name="safe_department"   
                               ng-maxlength="32" ng-focus="equipment.safe_departmentadd()" ng-blur="equipment.safe_departmentblur()"/><!--ng-minlength="4"-->
                    </div>
                    <!--验证信息-->
                    <label class="col-sm-5 control-label">
                        <div ng-show="equipment.safe_departmentcheck" align="left">
                            <span class="error">监管部门不能为空</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <!--责任部门-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                       行业主管部门：
                    </label>
                    <div class="col-sm-5">
                        <input class="form-control" ng-model="equipment.director_department" type="text" name="director_department"   
                               ng-maxlength="32" ng-focus="equipment.director_departmentadd()" ng-blur="equipment.director_departmentblur()"/><!--ng-minlength="4"-->
                    </div>
                    <!--验证信息-->
                    <label class="col-sm-5 control-label">
                        <div ng-show="equipment.director_departmentcheck" align="left">
                            <span class="error">主管部门不能为空</span>
                        </div>
                    </label>
                    <div class="line line-dashed b-b line-lg pull-in">
                    </div>
                </div>
                <!--保存-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">
                    </label>
                    <div class="col-sm-10">
                        <button class="btn m-b-xs w-xs btn-primary mr10" ng-click="submit()" type="button">
                            保存
                        </button>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in">
                </div>
            </form>
        </div>
    </div>
</div>